import request from '@/utils/request'

// 获取角色列表
export const reqGetRoleList = params => request({
  url: '/sys/role',
  params
})
// 修改角色详情
export const reqUpdateRole = data => request({
  method: 'put',
  url: `/sys/role/${data.id}`,
  data
})
// 获取已启用的角色列表
export const reqGetEnableRoles = () => request({
  url: '/sys/role/list/enabled'
})
// 获取角色详情
export const reqGetRoleDetail = (id) => request({
  url: `/sys/role/${id}`
})
// 删除角色
export const reqDelRole = id => request({
  method: 'delete',
  url: `/sys/role/${id}`

})
// 添加角色
export const reqAddRole = (data) => request({
  method: 'post',
  url: '/sys/role',
  data
})
